﻿@using System.Threading.Tasks
@using ASP.NetCoreDemo.Controllers
@using ASP.NetCoreDemo.Helper
@{
    ViewData["Title"] = "Encoding";
}
<h2>@ViewData["Title"].</h2>
<h3>@ViewData["Message"]</h3>

<form method="post" enctype="multipart/form-data" asp-controller="Home" asp-action="Encode">
   <div class="form-group">
      <div class="col-md-10">
         <p>Content:</p>
         <input type="text" name="content" value="@ViewData["BarcodeContent"]" required />
      </div>
      <div class="col-md-10">
         <p>Type:</p>
         <select asp-items="@Html.GetEnumSelectList(typeof(BarcodeFormats))" name="barcodeformat"></select>
      </div>
      <div class="col-md-10">
         <p>Type:</p>
         <select asp-items="@Html.GetEnumSelectList(typeof(BarcodeTagHelper.OutputFormat))" name="outputformat"></select>
      </div>
      <div class="col-md-10">
         <p>Width:</p>
         <input type="text" name="width" value="@ViewData["BarcodeWidth"]" />
      </div>
      <div class="col-md-10">
         <p>Height:</p>
         <input type="text" name="height" value="@ViewData["BarcodeHeight"]" />
      </div>
      <div class="col-md-10">
         <p>Margin:</p>
         <input type="text" name="margin" value="@ViewData["BarcodeMargin"]" />
      </div>
   </div>
   <div class="form-group">
      <div class="col-md-10">
         <input type="submit" value="Encode" />
      </div>
   </div>
   <div class="form-group">
      <div class="col-md-10">
         <barcode content="@ViewData["BarcodeContent"]" width="@ViewData["BarcodeWidth"]" height="@ViewData["BarcodeHeight"]" margin="@ViewData["BarcodeMargin"]" barcodeformat="@ViewData["BarcodeFormat"]" outputformat="@ViewData["OutputFormat"]" />
      </div>
   </div>
</form>
